package scauCmiScaffolding.compiled;

import org.eclipse.jet.JET2Context;
import org.eclipse.jet.JET2Template;
import org.eclipse.jet.JET2Writer;
import org.eclipse.jet.taglib.RuntimeTagElement;
import org.eclipse.jet.taglib.TagInfo;

public class _jet_cmiController implements JET2Template {
    private static final String _jetns_c = "org.eclipse.jet.controlTags"; //$NON-NLS-1$
    private static final String _jetns_java = "org.eclipse.jet.javaTags"; //$NON-NLS-1$

    public _jet_cmiController() {
        super();
    }

    private static final String NL = System.getProperty("line.separator"); //$NON-NLS-1$
    
    private static final TagInfo _td_c_get_5_9 = new TagInfo("c:get", //$NON-NLS-1$
            5, 9,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "$packageName", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_17_8 = new TagInfo("c:get", //$NON-NLS-1$
            17, 8,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "$packageName", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_18_8 = new TagInfo("c:get", //$NON-NLS-1$
            18, 8,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "$packageName", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_19_8 = new TagInfo("c:get", //$NON-NLS-1$
            19, 8,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "$packageName", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_20_8 = new TagInfo("c:get", //$NON-NLS-1$
            20, 8,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "$packageName", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_21_8 = new TagInfo("c:get", //$NON-NLS-1$
            21, 8,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "$packageName", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_22_8 = new TagInfo("c:get", //$NON-NLS-1$
            22, 8,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "$packageName", //$NON-NLS-1$
            } );
    private static final TagInfo _td_java_format_26_1 = new TagInfo("java:format", //$NON-NLS-1$
            26, 1,
            new String[] {
            },
            new String[] {
            } );
    private static final TagInfo _td_c_get_28_39 = new TagInfo("c:get", //$NON-NLS-1$
            28, 39,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "uppercaseFirst($projectName)", //$NON-NLS-1$
            } );

    public void generate(final JET2Context context, final JET2Writer __out) {
        JET2Writer out = __out;
        out.write("/**");  //$NON-NLS-1$        
        out.write(NL);         
        out.write(" * 封装所有的实体类的Service对象和属性编辑器对象，供Controller使用。");  //$NON-NLS-1$        
        out.write(NL);         
        out.write(" *项目特定的注入对象在这基础上自己添加");  //$NON-NLS-1$        
        out.write(NL);         
        out.write(" * */");  //$NON-NLS-1$        
        out.write(NL);         
        out.write("package ");  //$NON-NLS-1$        
        RuntimeTagElement _jettag_c_get_5_9 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_5_9); //$NON-NLS-1$ //$NON-NLS-2$
        _jettag_c_get_5_9.setRuntimeParent(null);
        _jettag_c_get_5_9.setTagInfo(_td_c_get_5_9);
        _jettag_c_get_5_9.doStart(context, out);
        _jettag_c_get_5_9.doEnd();
        out.write(".base;");  //$NON-NLS-1$        
        out.write(NL);         
        out.write(NL);         
        out.write("import java.util.List;");  //$NON-NLS-1$        
        out.write(NL);         
        out.write("import java.util.Set;");  //$NON-NLS-1$        
        out.write(NL);         
        out.write(NL);         
        out.write("import javax.servlet.http.HttpServletRequest;");  //$NON-NLS-1$        
        out.write(NL);         
        out.write(NL);         
        out.write("import org.springframework.beans.factory.annotation.Autowired;");  //$NON-NLS-1$        
        out.write(NL);         
        out.write("import org.springframework.stereotype.Controller;");  //$NON-NLS-1$        
        out.write(NL);         
        out.write("import org.springframework.web.bind.WebDataBinder;");  //$NON-NLS-1$        
        out.write(NL);         
        out.write("import org.springframework.web.bind.annotation.InitBinder;");  //$NON-NLS-1$        
        out.write(NL);         
        out.write(NL);         
        out.write("import ");  //$NON-NLS-1$        
        RuntimeTagElement _jettag_c_get_17_8 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_17_8); //$NON-NLS-1$ //$NON-NLS-2$
        _jettag_c_get_17_8.setRuntimeParent(null);
        _jettag_c_get_17_8.setTagInfo(_td_c_get_17_8);
        _jettag_c_get_17_8.doStart(context, out);
        _jettag_c_get_17_8.doEnd();
        out.write(".domain.*;");  //$NON-NLS-1$        
        out.write(NL);         
        out.write("import ");  //$NON-NLS-1$        
        RuntimeTagElement _jettag_c_get_18_8 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_18_8); //$NON-NLS-1$ //$NON-NLS-2$
        _jettag_c_get_18_8.setRuntimeParent(null);
        _jettag_c_get_18_8.setTagInfo(_td_c_get_18_8);
        _jettag_c_get_18_8.doStart(context, out);
        _jettag_c_get_18_8.doEnd();
        out.write(".service.*;");  //$NON-NLS-1$        
        out.write(NL);         
        out.write("import ");  //$NON-NLS-1$        
        RuntimeTagElement _jettag_c_get_19_8 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_19_8); //$NON-NLS-1$ //$NON-NLS-2$
        _jettag_c_get_19_8.setRuntimeParent(null);
        _jettag_c_get_19_8.setTagInfo(_td_c_get_19_8);
        _jettag_c_get_19_8.doStart(context, out);
        _jettag_c_get_19_8.doEnd();
        out.write(".pagination.*;");  //$NON-NLS-1$        
        out.write(NL);         
        out.write("import ");  //$NON-NLS-1$        
        RuntimeTagElement _jettag_c_get_20_8 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_20_8); //$NON-NLS-1$ //$NON-NLS-2$
        _jettag_c_get_20_8.setRuntimeParent(null);
        _jettag_c_get_20_8.setTagInfo(_td_c_get_20_8);
        _jettag_c_get_20_8.doStart(context, out);
        _jettag_c_get_20_8.doEnd();
        out.write(".propertyEditor.*;");  //$NON-NLS-1$        
        out.write(NL);         
        out.write("import ");  //$NON-NLS-1$        
        RuntimeTagElement _jettag_c_get_21_8 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_21_8); //$NON-NLS-1$ //$NON-NLS-2$
        _jettag_c_get_21_8.setRuntimeParent(null);
        _jettag_c_get_21_8.setTagInfo(_td_c_get_21_8);
        _jettag_c_get_21_8.doStart(context, out);
        _jettag_c_get_21_8.doEnd();
        out.write(".base.propertyEditor.*;");  //$NON-NLS-1$        
        out.write(NL);         
        out.write("import ");  //$NON-NLS-1$        
        RuntimeTagElement _jettag_c_get_22_8 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_22_8); //$NON-NLS-1$ //$NON-NLS-2$
        _jettag_c_get_22_8.setRuntimeParent(null);
        _jettag_c_get_22_8.setTagInfo(_td_c_get_22_8);
        _jettag_c_get_22_8.doStart(context, out);
        _jettag_c_get_22_8.doEnd();
        out.write(".base.service.*;");  //$NON-NLS-1$        
        out.write(NL);         
        //
        //	子类控制器，继承CmiController, CmiController继承CmiProjectService, CmiProjectService继承CmiService，
        RuntimeTagElement _jettag_java_format_26_1 = context.getTagFactory().createRuntimeTag(_jetns_java, "format", "java:format", _td_java_format_26_1); //$NON-NLS-1$ //$NON-NLS-2$
        _jettag_java_format_26_1.setRuntimeParent(null);
        _jettag_java_format_26_1.setTagInfo(_td_java_format_26_1);
        _jettag_java_format_26_1.doStart(context, out);
        JET2Writer _jettag_java_format_26_1_saved_out = out;
        while (_jettag_java_format_26_1.okToProcessBody()) {
            out = out.newNestedContentWriter();
            out.write(NL);         
            out.write("@Controller(\"CmiController\")");  //$NON-NLS-1$        
            out.write(NL);         
            out.write("public class CmiController extends Cmi");  //$NON-NLS-1$        
            RuntimeTagElement _jettag_c_get_28_39 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_28_39); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_get_28_39.setRuntimeParent(_jettag_java_format_26_1);
            _jettag_c_get_28_39.setTagInfo(_td_c_get_28_39);
            _jettag_c_get_28_39.doStart(context, out);
            _jettag_c_get_28_39.doEnd();
            out.write("Service{");  //$NON-NLS-1$        
            out.write(NL);         
            ////	注入前端页面的service
            //	@Autowired
            //	protected FrontSideService frontSideService;
            //
            //	
            //	@Autowired
            //    protected CmiAdapterService cmiAdapterService;
            //	
            //	@Autowired
            //	protected CmiEventDAO cmiEventDAO;
            //	
            //	
            out.write("\t");  //$NON-NLS-1$        
            out.write(NL);         
            out.write("\t@Autowired");  //$NON-NLS-1$        
            out.write(NL);         
            out.write("\tprotected CmiPsonService cmiPsonService;");  //$NON-NLS-1$        
            out.write(NL);         
            out.write("\t");  //$NON-NLS-1$        
            out.write(NL);         
            out.write("\t@Autowired");  //$NON-NLS-1$        
            out.write(NL);         
            out.write("\tprotected CmiCalendarDateEditor cmiCalendarDateEditor;");  //$NON-NLS-1$        
            out.write(NL);         
            out.write(NL);         
            out.write("\t@Autowired");  //$NON-NLS-1$        
            out.write(NL);         
            out.write("\tprotected CmiCalendarTimeEditor cmiCalendarTimeEditor;");  //$NON-NLS-1$        
            out.write(NL);         
            out.write("\t");  //$NON-NLS-1$        
            out.write(NL);         
            out.write("\t@Autowired");  //$NON-NLS-1$        
            out.write(NL);         
            out.write("\tprotected CmiCombinedSelectConditionsEditor cmiCombinedSelectConditionsEditor;");  //$NON-NLS-1$        
            out.write(NL);         
            out.write("\t");  //$NON-NLS-1$        
            out.write(NL);         
            out.write("\t@Autowired");  //$NON-NLS-1$        
            out.write(NL);         
            out.write("\tprotected CmiCombinedConditionsEditor cmiCombinedConditionsEditor;\t");  //$NON-NLS-1$        
            out.write(NL);         
            out.write("}");  //$NON-NLS-1$        
            out.write(NL);         
            _jettag_java_format_26_1.handleBodyContent(out);
        }
        out = _jettag_java_format_26_1_saved_out;
        _jettag_java_format_26_1.doEnd();
        out.write(NL);         
    }
}
